package com.ys.erp.stage_mall_service.bean.condition;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ys.erp.entity.data.bean.MallHomeActivityCoupons;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author minamiyama
 * @date 2025/5/27 15:52
 */

@Schema(description = "营销活动相关请求对象")
public class HomeActivityCondition {

    @Schema(description = "添加或更新营销活动请求对象")
    @Data
    public static class AddOrUpdateCon {
        @Schema(description = "活动id")
        private Long id;

        @Schema(description = "活动类型")
        private String activityType;

        @Schema(description = "活动名称")
        private String activityName;

        @Schema(description = "开始时间")
        private String startTime;

        @Schema(description = "结束时间")
        private String endTime;

        @Schema(description = "活动位置")
        private Integer location;

        @Schema(description = "营销活动卡卷对象")
        private List<ActivityCouponsCon> activityCouponsConList;

        @Schema(description = "活动所配置的商品")
        private List<GoodsInfo> goodsInfoList;


        private Integer status;


    }

    @Data
    @Schema(description = "营销活动卡卷对象")
    public static class ActivityCouponsCon {

        @Schema(description = "卡卷id集")
        private Long couponsId;

        @Schema(description = "发放方式")
        private String sendMethod;

        @Schema(description = "发放数量")
        private Long sendNum;

        @Schema(description = "领用规则")
        private AdoptRuleCon adoptRule;

        @Schema(description = "是否定时")
        private Integer isTiming;

        @Schema(description = "定时规则")
        private MallHomeActivityCoupons.TimingRuleDTO timIngRule;

        @Schema(description = "是否自动")
        private Integer isAuto;
    }


    @Data
    @Schema(description = "营销活动所配置的商品")
    public static class GoodsInfo {

        @Schema(description = "商品id")
        private Long goodsId;

        @Schema(description = "商品品牌")
        private String brandName;

        @Schema(description = "商品图片")
        private String goodsImage;

        @Schema(description = "商品名称")
        private String goodsName;

        @Schema(description = "商品价格")
        private String price;

        @Schema(description = "幺币抵扣率")
        private String ysCoinDiscount;

        @Schema(description = "商品发货方式")
        private String sendGoodsMethod;

        @Schema(description = "商品库存")
        private Integer stock;

        @Schema(description = "是否主区展示")
        private Integer isMainAreaDis;


    }

    @Data
    @Schema(description = "领用规则请求对象")
    public static class AdoptRuleCon {

        @Schema(description = "领用规则类型 day 天  num 次")
        private String type;

        @Schema(description = "领取数量")
        private String num;

    }

}
